✨ feat(action): add uv-install input and auto-detect uvx - #24
Merged
Conversation
The action always installed uv and used `uv run`, which is semantically wrong when no pyproject.toml exists and prevents users who already configured uv externally from skipping redundant setup. Add a `uv-install` input (default true) to let users opt out of the built-in setup-uv step. Auto-detect whether to use `uv run` or `uvx` based on pyproject.toml presence so repos without a project file get the correct isolated tool execution. Add CI jobs covering both paths and the external-uv scenario.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The action always hardcoded
uv runregardless of whether apyproject.tomlexisted, which is semantically wrong —uvxis the right tool for running standalone tools without a project context. Users who already configured uv externally (with a specific Python version, caching, etc.) also had no way to skip the redundantsetup-uvstep.✨ A new
uv-installinput controls uv installation with three modes:'auto'(default) detects whether uv is already available and skips installation if so,'true'always installs, and'false'never installs. The run step now auto-detects whether to useuv runoruvxbased onpyproject.tomlpresence, so repos without a project file get the correct isolated tool execution.This is fully backward compatible — the
'auto'default preserves existing behavior, and thepyproject.tomldetection matches what was already implicitly happening.Closes #6